namespace EntLibEC.View.Cmn
{
	using System;
	using System.Data;
	using System.Drawing;
	using System.Web;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;
	using EntLibEC.Biz;
	using EntLibEC.Cmn;
	/// <summary>
	///		Summary description for RMARequestStatus.
	/// </summary>
	public partial class RMARequestStatus : System.Web.UI.UserControl
	{

		protected void Page_Load(object sender, System.EventArgs e)
		{
			
		}

		public void BindRequestStatus(bool withAll)
		{
			ddlRequestStatus.Items.Clear();
			ddlRequestStatus.DataSource = AppEnum.GetRMARequestStatus();
			ddlRequestStatus.DataValueField = "key";
			ddlRequestStatus.DataTextField = "value";
			ddlRequestStatus.DataBind();
			if(withAll)
				ddlRequestStatus.Items.Insert( 0,new ListItem(AppConst.AllSelectString,AppConst.IntNull.ToString()));
		}

		public int Status
		{
			get
			{
			    return Convert.ToInt32(ddlRequestStatus.SelectedValue);
			}
			set
			{
			    ddlRequestStatus.SelectedIndex = ddlRequestStatus.Items.IndexOf(ddlRequestStatus.Items.FindByValue(value.ToString()));
			}
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		///		Required method for Designer support - do not modify
		///		the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{

		}
		#endregion
	}
}
